#pragma once
#include "qstring.h"
#include "qdatetime.h"
class ExtractTasks
{
private:
    int id;
    QString taskName;
    QDateTime startTime;
    QDateTime endTime;
    QString status;
    QString rasterImagePath;
    QString vectorFilePath;
    QString featureType;
public:
    // Constructor
    ExtractTasks();
    ExtractTasks(int id, const QString & taskName, const QDateTime & startTime, const QDateTime & endTime, const QString & status,
            const QString & rasterImagePath, const QString & vectorFilePath, const QString & featureType)
        : id(id), taskName(taskName), startTime(startTime), endTime(endTime), status(status),
        rasterImagePath(rasterImagePath), vectorFilePath(vectorFilePath), featureType(featureType) {
    }

    // Getters
    int getId() const { return id; }
    QString getTaskName() const { return taskName; }
    QDateTime getStartTime() const { return startTime; }
    QDateTime getEndTime() const { return endTime; }
    QString getStatus() const { return status; }
    QString getRasterImagePath() const { return rasterImagePath; }
    QString getVectorFilePath() const { return vectorFilePath; }
    QString getFeatureType() const { return featureType; }

    // Setters
    void setId(int newId) { id = newId; }
    void setTaskName(const QString& newTaskName) { taskName = newTaskName; }
    void setStartTime(const QDateTime& newStartTime) { startTime = newStartTime; }
    void setEndTime(const QDateTime& newEndTime) { endTime = newEndTime; }
    void setStatus(const QString& newStatus) { status = newStatus; }
    void setRasterImagePath(const QString& newRasterImagePath) { rasterImagePath = newRasterImagePath; }
    void setVectorFilePath(const QString& newVectorFilePath) { vectorFilePath = newVectorFilePath; }
    void setFeatureType(const QString& newFeatureType) { featureType = newFeatureType; }

    // toString function
    QString toString() const {
        return QString("Task[ID=%1, TaskName=%2, StartTime=%3, EndTime=%4, Status=%5, RasterImagePath=%6, VectorFilePath=%7, FeatureType=%8]")
            .arg(id)
            .arg(taskName)
            .arg(startTime.toString())
            .arg(endTime.toString())
            .arg(status)
            .arg(rasterImagePath)
            .arg(vectorFilePath)
            .arg(featureType);
    }
};

